package org.dromara.erp.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.tenant.core.TenantEntity;

import java.io.Serial;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 农场销售对象 erp_farm_sale
 *
 * @author Mr Lei QQ:235921049
 * @date 2024-06-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("erp_farm_sale")
public class ErpFarmSale extends TenantEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId(value = "id")
    private Long id;

    /**
     *
     */
    private String title;

    /**
     * 购买方
     */
    private String buyer;

    /**
     * 联系电话
     */
    private String buyerTel;

    /**
     * 配送地址
     */
    private String buyerAddr;

    /**
     * 销售员
     */
    private Long workerId;
    @TableField(exist = false)
    private String workerName;

    /**
     * 合计数量
     */
    private BigDecimal totalNum;

    /**
     * 合计金额
     */
    private BigDecimal totalMoney;
    @TableField(exist = false)
    private BigDecimal sumMoney;

    /**
     * 是否付款
     */
    private String isPayment;

    /**
     * 已付款金额
     */
    private BigDecimal paidMoney;

    /**
     * 是否提成
     */
    private String isCommission;

    /**
     * 提成比例
     */
    private BigDecimal commissionRate;

    /**
     * 佣金
     */
    private BigDecimal commissionMoney;

    /**
     * 销售日期
     */
    private Date saleTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 审核状态
     */
    private Integer auditStatus;

    /**
     * 审核时间
     */
    private Date auditTime;

    /**
     * 审核备注
     */
    private String auditRemark;

    /**
     * 审核人
     */
    private Long auditBy;
    @TableField(exist = false)
    private List<ErpFarmSaleInfo> contentInfo;


}
